# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-pydyf
_pyname=pydyf
pkgver=0.11.0
pkgrel=0
pkgdesc="A low-level PDF generator"
url="https://pypi.org/project/pydyf/"
arch="noarch"
license="BSD-3-Clause"
makedepends="py3-flit-core py3-gpep517"
checkdepends="
	ghostscript
	py3-coverage
	py3-pillow
	py3-pytest
	py3-pytest-xdist
	"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/p/pydyf/pydyf-$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
f02021d1d6bb59557a5b1c1a7f71551b1efe0f8019b2d2e28a84fb126b0d4b701e884971376b8a7b654a51f1831b3fab319a0212e9cb444a392304fc244133d1  pydyf-0.11.0.tar.gz
"
